package com.pmsystem.dao;

import com.pmsystem.pojo.User;
import com.pmsystem.pojo.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 
     * <p>Title: login</p >  
     * <p>Description: 业主登陆</p >  
     * @author 泽强
     * @param username
     * @param password
     * @return
     */
	User login(String username, String password);

	/**  
	 * <p>Title: insertUser</p >  
	 * <p>Description: 插入业主数据</p >  
	 * @author 魏家洛
	 * @param user
	 * @return  
	 */  
	int insertUser(User user);

	/**  
	 * <p>Title: selectUserEableEq2</p >  
	 * <p>Description:查询所有用户字段enable=2的数据</p >  
	 * @author 魏家洛
	 * @return  
	 */  
	List<User> selectUserEableEq2();

	/**  
	 * <p>Title: updateUserBeUse</p >  
	 * <p>Description:更新用户数据为可用状态</p >  
	 * @author 魏家洛
	 * @param userId
	 * @return  
	 */  
	int updateUserBeUse(@Param("userId") String userId);

	/**  
	 * <p>Title: deleteUser</p >  
	 * <p>Description:删除用户数据设置为不可用</p >  
	 * @author 魏家洛
	 * @param userId
	 * @return  
	 */  
	int deleteUser(@Param("userId") String userId);
}